package com.hx.setting.model;

import com.hx.setting.model.Group2roleModel.Group2roleTableField;

/**
 * -- ==== --
 * CREATE TABLE `hx_group2role` (
 * `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
 * `role_id` bigint(20) DEFAULT NULL COMMENT '角色外键   fk:hx_role:id',
 * `group_id` bigint(20) DEFAULT NULL COMMENT '组外键 fk:hx_groups:id',
 * PRIMARY KEY (`id`)
 * ) ENGINE=InnoDB DEFAULT CHARSET=utf8
 * -- ==== --
 * Generate Date : 2014-03-16
 * Generate Version : v3.0
 * Generate Name : Honey v3.1 Test
 * Generate User : THINK
 * JDK Version : 1.5
 */
public final class Group2roleModel extends GeneratedCriteria<Group2roleModel, Group2roleTableField>
{

	public static final String	TABLE_NAME		= "hx_group2role";

	public static final String	DATABASE_VENDOR	= "Mysql-5.5";

	/**
	 * 
	 * 数据库字段枚举
	 */
	public enum Group2roleTableField implements TableField
	{
		/** 
		 * 主键
		 */
		ID( new String[]
		{ "id", "id", "主键 " } ),
		/** 
		 * 角色外键
		 */
		ROLEID( new String[]
		{ "role_id", "roleId", "角色外键 " } ),
		/** 
		 * 组外键
		 */
		GROUPID( new String[]
		{ "group_id", "groupId", "组外键 " } );

		/** 数据库字段名称 */
		private final String	value;

		/** 映射到java属性名称 */
		private final String	property;

		/** 数据库字段注释 */
		private final String	show;

		/** 
		 * 
		 * @param  value {@code   String}
		 * 
		 * @see    String
		 */
		private Group2roleTableField(String args[])
		{
			this.value = args[0];
			this.property = args[1];
			this.show = args[2];
		}

		public static final Group2roleTableField getInstance(String property)
		{
			Group2roleTableField answer = null;
			if ( property != null )
			{
				int hash = property.hashCode();
				switch ( hash )
				{
					case 3355 : //id,主键 
						answer = ID;
						break;
					case -925416399 : //roleId,角色外键 
						answer = ROLEID;
						break;
					case 293428218 : //groupId,组外键 
						answer = GROUPID;
						break;
				}
			}
			return answer;
		}

		/** 
		 * 获取数据库字段名称
		 * 
		 * @return {@code  Short}
		 */
		@Override
		public final String getValue()
		{
			return this.value;
		}

		/** 
		 * 获取映射对象属性名称
		 * 
		 * @return {@code  Short}
		 */
		@Override
		public final String getProperty()
		{
			return this.property;
		}

		/** 
		 * 获取字段显示名称(数据库字段注释)
		 * 
		 * @return {@code  String}
		 */
		@Override
		public final String getShow()
		{
			return this.show;
		}

		/** 
		 * 
		 * @return {@code  String}
		 */
		@Override
		public String toString()
		{
			return this.value;
		}
	}
}
/* Honey v3.1 Test - version:4 - OriginalChecksum:B95de028bac73fc0a2bec88643cffad0d (do not edit this line) */
